package a04dem04;

public class Test1 {
    public static void main(String[] args) {
        String s = "小诗诗dqwefgwfqwfwq12312小丹丹dqwefgwfqwfwq12312小慧慧";

        String regex = "[\\w&&[^_]]+";
        String result1 = s.replaceAll(regex, "vs");
        System.out.println(result1);

        System.out.println("-----------------");

        String[] arr = s.split("[\\w&&[^_]]+");
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
